#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/ipc.h>
#include<sys/msg.h>
#include<string.h>

#define _PATH_ "."
#define _PROJECT_ID_ 0x6666
#define _MAX_BUF_ 1024	
#define _SERVER_ID_ 1
#define _CLIENT_ID_ 2

typedef struct msgvp
{
	long mtype;
	char mmsg_buf[_MAX_BUF_];
}msgvp;
int get_msgid();
int use_msgid();

void msg_receive(int msg_id,msgvp*msg_vp,int msgvp_size,long mstype);
void msg_send(int msg_id,msgvp*msg_vp,int msgvp_size,char *str,int msgtype);
void msg_distory(int msg_id);
